﻿@{
    ViewBag.Title = "ListPublisher";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

@section scripts
{
    <script type="text/javascript" src="~/Scripts/App/Admin/publisher_regpack.js"></script>
}

<!-- Page's header -->
<div class="content-header">
    <div class="header-section">
        <h1>
            <i class="gi gi-certificate"></i>Quản Lý Người Đăng Quảng Cáo<br>
            <small>Đăng Ký Gói Gia Hạn Người Đăng QC</small>
        </h1>
    </div>
</div>
<ul class="breadcrumb breadcrumb-top">
    <li><a href="../Admin/index"><i class="fa fa-home"></i></a></li>
    <li><a href="../Admin/ListPublisher">Người Đăng QC</a></li>
    <li><a href="../Admin/PublisherRegPackage">Gia Hạn</a></li>
</ul>

<!-- List Member -->
<div class="tab-content">
    <div id="listpub-div" class="block block-alt-noborder tab-pane fade in active animation-slideRight">
        <div class="container-fluid">
            <div class="row">
                <div class="pull-right col-md-2" style="margin-left: 10px"><a href="AddPublisher" class="btn btn-block btn-success">Tạo Mới</a></div>
                <div class="dataTables_filter" id="example-datatable_filter">
                    <div class="input-group">
                        <input type="text" data-bind="instantValue: SearchString, event: { keypress: $root.EnterSendMsg }" aria-controls="example-datatable" class="form-control" placeholder="Tìm Kiếm">
                        <span class="input-group-addon" style="cursor: pointer" data-bind="click: $root.SendMsg">
                            <i class="fa fa-search"></i>
                        </span>
                    </div>
                </div>
            </div>
        </div>
        <br />

        <div class="table-responsive">
            <table class="table table-vcenter table-striped table-hover">
                <thead>
                    <tr class="text-center">
                        <th class="text-center">#</th>
                        <th>Tài Khoản</th>
                        <th>Email</th>
                        <th class="text-center" style="width: 250px;">Công Ty</th>
                        <th class="text-center" style="width: 250px;">Ngày Bắt Đầu</th>
                        <th class="text-center" style="width: 250px;">Ngày Hết Hạn</th>
                        <th class="text-center" style="width: 200px;">Thao Tác</th>
                    </tr>
                </thead>
                <tbody data-bind="foreach: Publishers">
                    <tr>
                        <td class="text-center" data-bind="text: PubId"></td>
                        <td data-bind="text: UserName"></td>
                        <td data-bind="text: Email"></td>
                        <td class="text-center" data-bind="text: CompanyName"></td>
                        <td class="text-center" data-bind="text: AvailableDateDisplay"></td>
                        <td class="text-center" data-bind="text: ExpriedDateDisplay"></td>
                        <td class="text-center">
                            <div class="btn-group btn-group-xs">
                                <a class="btn btn-xs btn-default" href="#regpub-div" data-toggle="tab" data-bind="click: $root.doView">
                                    <i class="fa fa-pencil"></i>Gia Hạn
                                </a>
                            </div>
                        </td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr>
                        <td colspan="5">
                            <div class="col-md-4 pull-right">
                                <ul class="pager">
                                    <li class="prev" data-bind="css: { disabled: IsPrevious() === false }">
                                        <a href="#" data-bind="    click: $root.doPrevious">← Trang Trước</a>
                                    </li>
                                    <li class="next" data-bind="css: { disabled: IsNext() === false }">
                                        <a href="#" data-bind="    click: $root.doNext">Trang Sau →</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                </tfoot>
            </table>
        </div>
    </div>


    <!-- Member Edit Popup -->
    <div id="regpub-div" class="block tab-pane animation-slideRight fade">
        <form id="regPub-frm" data-bind="submit: $root.doRegPackage" class="form-horizontal form-bordered" novalidate="novalidate">
            <div class="form-group">
                <label for="val_title" class="col-md-4 control-label">Tài Khoản<span class="text-danger">*</span></label>
                <div class="col-md-6">
                    <div class="input-group">
                        <input type="text" class="form-control" name="val_username" data-bind="value: UserName" id="val_username" disabled>
                        <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="val_title" class="col-md-4 control-label">Ngày Bắt Đầu<span class="text-danger">*</span></label>
                <div class="col-md-6">
                    <div class="input-group">
                        <input type="text" class="form-control" name="val_availabledate" data-bind="value: AvailableDateDisplay" id="val_availabledate" disabled>
                        <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="val_title" class="col-md-4 control-label">Ngày Hết Hạn<span class="text-danger">*</span></label>
                <div class="col-md-6">
                    <div class="input-group">
                        <input type="text" class="form-control" name="val_exprieddate" data-bind="value: ExpriedDateDisplay" id="val_exprieddate" disabled>
                        <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="val_title" class="col-md-4 control-label">Gói Gia Hạn<span class="text-danger">*</span></label>
                <div class="col-md-6">
                    <div class="input-group">
                        <label class="radio">
                            <input type="radio" name="packagepub" value="0" data-bind="checked: PackagePub" />
                            Không Gia Hạn
                        </label>
                        <label class="radio">
                            <input type="radio" name="packagepub" value="1" data-bind="checked: PackagePub" />
                            1 Tháng
                        </label>
                        <label class="radio">
                            <input type="radio" name="packagepub" value="2" data-bind="checked: PackagePub" />
                            3 Tháng
                        </label>
                        <label class="radio">
                            <input type="radio" name="packagepub" value="3" data-bind="checked: PackagePub" />
                            1 Năm
                        </label>
                        <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                    </div>
                </div>
            </div>

            <div class="form-group form-actions">
                <div class="col-md-8 col-md-offset-4">
                    <button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-arrow-right"></i>Đăng Ký Gói Gia Hạn</button>
                    <a class="btn btn-sm btn-warning" href="#listpub-div" data-toggle="tab" type="button"><i class="gi gi-sort"></i>Danh Sách</a>
                </div>
            </div>
        </form>
    </div>
</div>

